<%@ page language="java" import="java.util.*,bookshop.config.VersionInfo" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>${book.bookName} - 图书信息</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/application.css"/>">
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/book_show.css"/>">
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/listdata.css"></c:url>">
	
	<script type="text/javascript">
	
	     function logout() 
	     {
			if(confirm("您真的要离开当当网吗?")) {
				location.href="<c:url value="/customer?act=logout"/>";
			 }
	      }
	
	</script>

  </head>
  
  <body>
		<div id=main>
		    <DIV class=head_container >
		    	<DIV class=head_welcome >
					<SPAN class=head_toutext id=nickname >   
						您好,${loginedCustomer.customerName}  
		    			[<span onclick="logout();" style="cursor:hand;color:green">退出系统</span>]
					</SPAN>
		    	</DIV>
				<DIV class=head_head_list>
					<DIV class=head_head_list_left >
						<SPAN class=head_logo> 
							<A href="<c:url value="/workflow?act=mainscreen" />" name=backtobook>
								<IMG src="<c:url value="/pics/front/book_logo.gif" />"> 
							</A> 
						</SPAN>
					</DIV>
					<DIV class=head_head_list_right>
						<DIV class=head_lianjie>
							<IMG class=head_lianjie1 src="<c:url value="/pics/front/bg_book.gif" />">
							<A href="<c:url value="/workflow?act=mainscreen" />" name=backtobook>
							<IMG src="<c:url value="/pics/front/book_dangdang.gif" />" border=0></A>
						</DIV>
					</DIV>
				</DIV>
				<!-- 
				<div class=head_search_div>
				    <FORM name=searchform action="" method=get>
						<INPUT class=head_search_kuang id=key_S name=key autocomplete="off">
						<INPUT id=catalog type=hidden value=01 name=catalog>
					</FORM>
					<SPAN class=head_button>
						<A name=search_book>
							<IMG onclick="" src="<c:url value="/pics/front/button.gif" />" border=0>
						</A>
					</SPAN>
				</div>
				-->
				<DIV class=head_search_bg></DIV>
			</DIV>
			<DIV class=mainsearch></DIV>
            <DIV class=wrap>
			    <DIV class=left >
			        <DIV class=left_div_yellow1>
			            <H2 class=left_title >浏览本书的顾客还看过</H2>  
			            <c:forEach items="${books}" var="book">
                        <H2>
						<A href="<c:url value="/workflow?act=showBookByCode&bookCode=${book.bookCode}" />" name=link_prd_name>${book.bookName}</A>
					   </H2>	
					   <hr/>
			            </c:forEach>                          
			        </DIV>
			        <DIV class=left_div_gray>
			            <H2 class=left_title>您最近的浏览历史</H2> 
			            <c:forEach items="${browss}" var="brows">
			            <c:if test="${brows.book.bookCode!=book.bookCode}">
                        <H2>
						<A href="<c:url value="/workflow?act=showBookByCode&bookCode=${brows.book.bookCode}" />" name=link_prd_name>${brows.book.bookName}</A>
					   </H2>	
					   <hr/>
                        </c:if>		            
			            </c:forEach>                       
			        </DIV>
			    </DIV>
			    <DIV class=right >
			        <DIV class=right_wai>
			            <DIV class=shuming>
			                <DIV class=shuming_left>
			                    <SPAN class=black000><B>《${book.bookName}》</B>&nbsp;&nbsp;<a style="TEXT-DECORATION: underline;cursor:hand" onclick="history.go(-1)">返回</a></SPAN>
			                    <DIV class=empty_box></DIV>
                            </DIV>
			            </DIV>
			            <DIV class=book_left>
								<DIV class=book_pic>
									<IMG id=img_show_prd  style="width:200px; height:200px;" src="<c:url value="/workflow?act=showcover&bookcode=${book.bookCode}"/>">
								</DIV>
							</DIV>
						<DIV class=book_right>
							<DIV id=author_>
								图书作者：${book.bookAuthor}
							</DIV>
							<DIV id=publisher_>
								出 版 社：${book.bookPublisher}
							</DIV>
							<UL>
								<LI>
									出版时间：
									<fmt:formatDate value="${book.bookPubDate}" pattern="yyyy-MM-dd" />
								</LI>
								<LI>
									字 数： 1234千字
								</LI>
								<LI>
									版 次： 第1版
								</LI>
								<LI>
									页 数： 235
								</LI>
								<LI>
									印刷时间：2008-5-18
								</LI>
								<LI>
									开    本： 16开
								</LI>
								<LI>
									印    次： 2
								</LI>
								<LI>
									纸    张： A4
								</LI>
								<LI>
									I S B N： ${book.bookCode}
								</LI>
								<LI>
									包    装：平装
								</LI>
							</UL>
							<DIV id=__categroy_bk>
								所属分类：${book.ctg.ctgName}
							</DIV>
							<DIV class=jiage>
								<SPAN class=gray87>单价: ${book.bookPrice}元</SPAN>
							</DIV>
							<DIV class=goumai>
								<A title=购买 target="_blank" href="<c:url value="/shoppingcart?act=addBookToCart&bookcode=${book.bookCode}"/>"
									name=purchase_bk>
                                    <IMG src="<c:url value='/pics/front/booksale.gif'/>" border=0>
								</A>
								<A id=favor target="_blank" title=放入暂存架
									href="<c:url value="/tempstore?act=add_temp&bookcode=${book.bookCode}"/>" name=wishlist_bk><IMG
										id=imgfavor
										src="<c:url value='/pics/front/bookz_save.gif'/>"  border=0>
								</A>
							</DIV>
						</DIV>
						<div style="padding:10px;">
						     摘要信息：<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;${book.bookDesc}
					    </div>	
					    <hr>
					    <c:if test="${not empty page.pageContent}">
					    <c:forEach items="${page.pageContent}" var="comment">
					    <div>
					     <div align="left">
	               
                           <tt style="margin-left:40px; width: 200px;">${comment.custIp}</tt>
                           <tt style="margin-left:40px; width: 100px;">${comment.title} <br/>
                                                                
						<c:if test="${comment.mark==0}">0</c:if>
						<c:if test="${comment.mark!=0}">
							<c:choose>
						      <c:when test="${comment.mark==1}">
						         <IMG src="<c:url value="/pics/front/star_red.gif"/>">
						      </c:when>
						      <c:when test="${comment.mark==2}">
							      <IMG src="<c:url value="/pics/front/star_red.gif"/>">
							      <IMG src="<c:url value="/pics/front/star_red.gif"/>">
						      </c:when>
						      <c:when test="${comment.mark==3}">
							      <IMG src="<c:url value="/pics/front/star_red.gif"/>">
							      <IMG src="<c:url value="/pics/front/star_red.gif"/>">
							      <IMG src="<c:url value="/pics/front/star_red.gif"/>">
						      </c:when>
						      <c:when test="${comment.mark==4}">
							      <IMG src="<c:url value="/pics/front/star_red.gif"/>">
							      <IMG src="<c:url value="/pics/front/star_red.gif"/>">
							      <IMG src="<c:url value="/pics/front/star_red.gif"/>">
							      <IMG src="<c:url value="/pics/front/star_red.gif"/>">
						      </c:when>
						      <c:when test="${comment.mark==5}">
							      <IMG src="<c:url value="/pics/front/star_red.gif"/>">
							      <IMG src="<c:url value="/pics/front/star_red.gif"/>">
							      <IMG src="<c:url value="/pics/front/star_red.gif"/>">
	                              <IMG src="<c:url value="/pics/front/star_red.gif"/>">
	                              <IMG src="<c:url value="/pics/front/star_red.gif"/>">
						      </c:when>
						    </c:choose>						  						 
						</c:if>

                          <br/>${comment.content} </tt>
                           <tt style="margin-left:80px;">评论时间：<fmt:formatDate value="${comment.issueTime}" pattern="yyyy-MM-dd HH:mm:ss"/></tt>
                       </div>
					    <hr>
					    </div>		
					    </c:forEach>			
					    </c:if>
					</DIV>
               </DIV>
           </DIV>
     </div>
     
	<div style="clear:both;"></div>
    
    <div id="footer" style="margin:0px auto;width:968px;padding-top:10px;border-top:1px solid; COLOR: #404040;COLOR: #666; text-align:center; background-color:#fff;font-size:12px;">
          <%=VersionInfo.buildFooterStr()%>       
    </div>	     
  </body>
</html>
